<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 3/11/12
 * Time: 12:54 AM
 */
class Module extends CT_Model
{
    function __construct()
    {
        parent::__construct();
        $this->table = "CT_modulos";
    }

    function getModules($datos)
    {
        $this->db->select('
            mp.modulo_k,
            mp.accion_k,
            m.titulo,
            m.img_big,
            m.icon_cls,
            m.controller,
            m.menu_mostrar
        ');
        $this->db->from('CT_modulos_permisos mp');
        $this->db->join('CT_modulos m', 'mp.modulo_k=m.modulo_k');
        $this->db->where($datos);
        $this->db->where("mp.estatus = 1");
        $query = $this->db->get();
        return $query->result();
    }
}
